package io.example;

import io.vertx.core.AbstractVerticle;

public class MyVerticle extends AbstractVerticle {
	int i = 0;

	@Override
	public void start() throws Exception {
		vertx.createHttpServer().requestHandler(req -> {
			i++;
			System.out.println(i);
			req.response().end();//要关闭请求，否则连接很快会被占满
		}).listen(8080);

		vertx.createHttpServer().requestHandler(req -> {
			System.out.println(i);
			req.response().end("" + i);
		}).listen(8081);
	}
}
